<script setup lang="ts">
  import {useCounterStore} from './store/counter'
  
  
  const store = useCounterStore()
</script>

<template>
  <h1> Vue 状态管理</h1>
  <p>store:{{ store.totalCount }}</p>
  <p>{{ store.doubleCount }}</p>
  <button @click="store.addTotalCount(1)">修改数据</button>
  <button @click="store.addTotalCount(10)">*2</button>
  
</template>